import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import '@/assets/css/main.less'
import { router, setupRouter } from '@/router'
import pinia from '@/store/index'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const startApp = async () => {
  const app = createApp(App)

  app.use(pinia)

  setupRouter(app)

  app.use(ElementPlus)

  for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }

  await router.isReady()

  app.mount('#app')

  const rbacAdminArt = `
RRRRRRRRRRRR   BBBBBBBBBBBBB            A          CCCCCCCCCCCCC                   A           DDDDDDDDD      MMMMM        MMMMM   IIIII  NNNNN    NNNNN
RRR     RRRR   BBBB       BBBB         AAA         CCCCCCCCCCCCC                  AAA          DDDDDDDDDD     MMMMMM      MMMMMM   IIIII  NNNNNN   NNNNN
RRR      RRRR  BBBB         BBB       AAAAA        CCCC                          AAAAA         DDD     DDDD   MMMMMMM    MMMMMMM   IIIII  NNNNNNN  NNNNN
RRR    RRRRRR  BBBB      BBBBBB      AA   AA       CCCC           ##########    AA   AA        DDD      DDD   MMMMMMMM  MMMMMMMM   IIIII  NNNNNNNN NNNNN
RRRRRRRRRRRR   BBBBBBBBBBBBBBB      AAAAAAAAA      CCCC                        AAAAAAAAA       DDD      DDD   MMMMM MMMMMM MMMMM   IIIII  NNNNNNNNNNNNNN
RRRRRRRRR      BBBB      BBBBBB    AAAAAAAAAAA     CCCC                       AAAAAAAAAAA      DDD      DDD   MMMMM  MMMM  MMMMM   IIIII  NNNNN NNNNNNNN
RRR   RRR      BBBB         BBB   AAA       AAA    CCCC                      AAA       AAA     DDD    DDDD    MMMMM   MM   MMMMM   IIIII  NNNNN  NNNNNNN
RRR    RRR     BBBB       BBBB   AAA         AAA   CCCCCCCCCCCCC            AAA         AAA    DDDDDDDDDD     MMMMM        MMMMM   IIIII  NNNNN   NNNNNN
RRR     RRR    BBBBBBBBBBBBB    AAA           AAA  CCCCCCCCCCCCC           AAA           AAA   DDDDDDDDD      MMMMM        MMMMM   IIIII  NNNNN    NNNNN

仓库连接：https://gitee.com/wdep/RBAC-Admin
期待您的star，您的支持是我最大的动力！
`

  console.log(`%c${rbacAdminArt}`, 'color: green; font-family: monospace; line-height: 1.2;')
}

startApp()
